package com.morizhang.usersys.api.bean;

import com.morizhang.usersys.api.IService;

import java.util.HashMap;
import java.util.Map;

public class ApiDefinitionHolder {
    private static volatile Map<String, IService> apiDefinitionMap = new HashMap<>();

    public static void add(String serviceName, IService service) {
        apiDefinitionMap.put(serviceName,service);
    }

    public static IService get(String serviceName) {
        return apiDefinitionMap.get(serviceName);
    }
}
